class SocketParmaModel {
  int? code;
  String? method;
  String? message;
  SocketData? socketData;

  SocketParmaModel({this.code, this.method, this.message, this.socketData});

  SocketParmaModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    method = json['method'];
    message = json['message'];
    socketData =
        json['data'] != null ? SocketData.fromJson(json['data']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['code'] = code;
    data['method'] = method;
    data['message'] = message;
    if (socketData != null) {
      data['data'] = socketData!.toJson();
    }
    return data;
  }
}

class SocketData {
  int? roomid;
  int? type;
  int? tip;
  int? coin;
  String? content;
  int? linkType;
  String? linkUrl;
  int? fromUid;
  int? toUid;
  int? cancalltime;

  SocketData(
      {this.roomid,
      this.type,
      this.tip,
      this.coin,
      this.content,
      this.linkType,
      this.linkUrl,
      this.fromUid,
      this.toUid,
      this.cancalltime});

  SocketData.fromJson(Map<String, dynamic> json) {
    roomid = json['roomid'];
    type = json['type'];
    tip = json['tip'];
    coin = json['coin'];
    content = json['content'];
    linkType = json['link_type'];
    linkUrl = json['link_url'];
    fromUid = json['from_uid'];
    toUid = json['to_uid'];
    cancalltime = json['cancalltime'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['roomid'] = roomid;
    data['type'] = type;
    data['tip'] = tip;
    data['coin'] = coin;
    data['content'] = content;
    data['link_type'] = linkType;
    data['link_url'] = linkUrl;
    data['from_uid'] = fromUid;
    data['to_uid'] = toUid;
    data['cancalltime'] = cancalltime;
    return data;
  }
}
